import 'package:flutter/material.dart';
import 'package:sky_ui/sky_ui.dart';

class IconDemo extends StatefulWidget {
  const IconDemo({super.key});

  @override
  State<IconDemo> createState() => _IconDemoState();
}

class _IconDemoState extends State<IconDemo> {
  late List<Map<String, IconData>> iconList = [
    {"iceCreamRound": ElementIcons.iceCreamRound},
    {"iceCreamSquare": ElementIcons.iceCreamSquare},
    {"lollipop": ElementIcons.lollipop},
    {"potatoStrips": ElementIcons.potatoStrips},
    {"milkTea": ElementIcons.milkTea},
    {"iceDrink": ElementIcons.iceDrink},
    {"iceTea": ElementIcons.iceTea},
    {"coffee": ElementIcons.coffee},
    {"orange": ElementIcons.orange},
    {"pear": ElementIcons.pear},
    {"apple": ElementIcons.apple},
    {"cherry": ElementIcons.cherry},
    {"watermelon": ElementIcons.watermelon},
    {"grape": ElementIcons.grape},
    {"refrigerator": ElementIcons.refrigerator},
    {"gobletSquareFull": ElementIcons.gobletSquareFull},
    {"gobletSquare": ElementIcons.gobletSquare},
    {"gobletFull": ElementIcons.gobletFull},
    {"goblet": ElementIcons.goblet},
    {"coldDrink": ElementIcons.coldDrink},
    {"coffeeCup": ElementIcons.coffeeCup},
    {"waterCup": ElementIcons.waterCup},
    {"hotWater": ElementIcons.hotWater},
    {"iceCream": ElementIcons.iceCream},
    {"dessert": ElementIcons.dessert},
    {"sugar": ElementIcons.sugar},
    {"tableware": ElementIcons.tableware},
    {"burger": ElementIcons.burger},
    {"knifeFork": ElementIcons.knifeFork},
    {"forkSpoon": ElementIcons.forkSpoon},
    {"chicken": ElementIcons.chicken},
    {"food": ElementIcons.food},
    {"dish1": ElementIcons.dish1},
    {"dish": ElementIcons.dish},
    {"refreshLeft": ElementIcons.refreshLeft},
    {"refreshRight": ElementIcons.refreshRight},
    {"warningOutline": ElementIcons.warningOutline},
    {"setting": ElementIcons.setting},
    {"phoneOutline": ElementIcons.phoneOutline},
    {"moreOutline": ElementIcons.moreOutline},
    {"finished": ElementIcons.finished},
    {"view": ElementIcons.view},
    {"loading": ElementIcons.loading},
    {"refresh": ElementIcons.refresh},
    {"rank": ElementIcons.rank},
    {"sort": ElementIcons.sort},
    {"mobilePhone": ElementIcons.mobilePhone},
    {"service": ElementIcons.service},
    {"sell": ElementIcons.sell},
    {"soldOut": ElementIcons.soldOut},
    {"delete": ElementIcons.delete},
    {"minus": ElementIcons.minus},
    {"plus": ElementIcons.plus},
    {"check": ElementIcons.check},
    {"close": ElementIcons.close},
    {"dArrowRight": ElementIcons.dArrowRight},
    {"dArrowLeft": ElementIcons.dArrowLeft},
    {"arrowLeft": ElementIcons.arrowLeft},
    {"arrowDown": ElementIcons.arrowDown},
    {"arrowRight": ElementIcons.arrowRight},
    {"arrowUp": ElementIcons.arrowUp},
    {"key": ElementIcons.key},
    {"user": ElementIcons.user},
    {"unlock": ElementIcons.unlock},
    {"lock": ElementIcons.lock},
    {"top": ElementIcons.top},
    {"topRight": ElementIcons.topRight},
    {"topLeft": ElementIcons.topLeft},
    {"right": ElementIcons.right},
    {"back": ElementIcons.back},
    {"bottom": ElementIcons.bottom},
    {"bottomRight": ElementIcons.bottomRight},
    {"bottomLeft": ElementIcons.bottomLeft},
    {"moonNight": ElementIcons.moonNight},
    {"moon": ElementIcons.moon},
    {"cloudyAndSunny": ElementIcons.cloudyAndSunny},
    {"partlyCloudy": ElementIcons.partlyCloudy},
    {"cloudy": ElementIcons.cloudy},
    {"sunny": ElementIcons.sunny},
    {"sunset": ElementIcons.sunset},
    {"sunrise1": ElementIcons.sunrise1},
    {"sunrise": ElementIcons.sunrise},
    {"heavyRain": ElementIcons.heavyRain},
    {"lightning": ElementIcons.lightning},
    {"lightRain": ElementIcons.lightRain},
    {"windPower": ElementIcons.windPower},
    {"watch": ElementIcons.watch},
    {"watch1": ElementIcons.watch1},
    {"timer": ElementIcons.timer},
    {"alarmClock": ElementIcons.alarmClock},
    {"mapLocation": ElementIcons.mapLocation},
    {"deleteLocation": ElementIcons.deleteLocation},
    {"addLocation": ElementIcons.addLocation},
    {"locationInformation": ElementIcons.locationInformation},
    {"locationOutline": ElementIcons.locationOutline},
    {"place": ElementIcons.place},
    {"discover": ElementIcons.discover},
    {"firstAidKit": ElementIcons.firstAidKit},
    {"trophy1": ElementIcons.trophy1},
    {"trophy": ElementIcons.trophy},
    {"medal": ElementIcons.medal},
    {"medal1": ElementIcons.medal1},
    {"stopwatch": ElementIcons.stopwatch},
    {"mic": ElementIcons.mic},
    {"baseball": ElementIcons.baseball},
    {"soccer": ElementIcons.soccer},
    {"football": ElementIcons.football},
    {"basketball": ElementIcons.basketball},
    {"starOff": ElementIcons.starOff},
    {"copyDocument": ElementIcons.copyDocument},
    {"fullScreen": ElementIcons.fullScreen},
    {"switchButton": ElementIcons.switchButton},
    {"aim": ElementIcons.aim},
    {"crop": ElementIcons.crop},
    {"odometer": ElementIcons.odometer},
    {"time": ElementIcons.time},
    {"circleCheck": ElementIcons.circleCheck},
    {"removeOutline": ElementIcons.removeOutline},
    {"circlePlusOutline": ElementIcons.circlePlusOutline},
    {"bangzhu": ElementIcons.bangzhu},
    {"bell": ElementIcons.bell},
    {"closeNotification": ElementIcons.closeNotification},
    {"microphone": ElementIcons.microphone},
    {"turnOffMicrophone": ElementIcons.turnOffMicrophone},
    {"position": ElementIcons.position},
    {"postcard": ElementIcons.postcard},
    {"message": ElementIcons.message},
    {"chatLineSquare": ElementIcons.chatLineSquare},
    {"chatDotSquare": ElementIcons.chatDotSquare},
    {"chatDotRound": ElementIcons.chatDotRound},
    {"chatSquare": ElementIcons.chatSquare},
    {"chatLineRound": ElementIcons.chatLineRound},
    {"chatRound": ElementIcons.chatRound},
    {"setUp": ElementIcons.setUp},
    {"turnOff": ElementIcons.turnOff},
    {"open": ElementIcons.open},
    {"connection": ElementIcons.connection},
    {"link": ElementIcons.link},
    {"cpu": ElementIcons.cpu},
    {"thumb": ElementIcons.thumb},
    {"female": ElementIcons.female},
    {"male": ElementIcons.male},
    {"guide": ElementIcons.guide},
    {"help": ElementIcons.help},
    {"news": ElementIcons.news},
    {"ship": ElementIcons.ship},
    {"truck": ElementIcons.truck},
    {"bicycle": ElementIcons.bicycle},
    {"priceTag": ElementIcons.priceTag},
    {"discount": ElementIcons.discount},
    {"wallet": ElementIcons.wallet},
    {"coin": ElementIcons.coin},
    {"money": ElementIcons.money},
    {"bankCard": ElementIcons.bankCard},
    {"box": ElementIcons.box},
    {"present": ElementIcons.present},
    {"shoppingBag2": ElementIcons.shoppingBag2},
    {"shoppingBag1": ElementIcons.shoppingBag1},
    {"shoppingCart2": ElementIcons.shoppingCart2},
    {"shoppingCart1": ElementIcons.shoppingCart1},
    {"shoppingCartFull": ElementIcons.shoppingCartFull},
    {"smoking": ElementIcons.smoking},
    {"noSmoking": ElementIcons.noSmoking},
    {"house": ElementIcons.house},
    {"tableLamp": ElementIcons.tableLamp},
    {"school": ElementIcons.school},
    {"officeBuilding": ElementIcons.officeBuilding},
    {"toiletPaper": ElementIcons.toiletPaper},
    {"notebook2": ElementIcons.notebook2},
    {"notebook1": ElementIcons.notebook1},
    {"files": ElementIcons.files},
    {"collection": ElementIcons.collection},
    {"receiving": ElementIcons.receiving},
    {"pictureOutline": ElementIcons.pictureOutline},
    {"pictureOutlineRound": ElementIcons.pictureOutlineRound},
    {"suitcase1": ElementIcons.suitcase1},
    {"suitcase": ElementIcons.suitcase},
    {"film": ElementIcons.film},
    {"editOutline": ElementIcons.editOutline},
    {"collectionTag": ElementIcons.collectionTag},
    {"dataAnalysis": ElementIcons.dataAnalysis},
    {"pieChart": ElementIcons.pieChart},
    {"dataBoard": ElementIcons.dataBoard},
    {"reading": ElementIcons.reading},
    {"magicStick": ElementIcons.magicStick},
    {"coordinate": ElementIcons.coordinate},
    {"mouse": ElementIcons.mouse},
    {"dataLine": ElementIcons.dataLine},
    {"brush": ElementIcons.brush},
    {"headset": ElementIcons.headset},
    {"umbrella": ElementIcons.umbrella},
    {"scissors": ElementIcons.scissors},
    {"videoCamera": ElementIcons.videoCamera},
    {"mobile": ElementIcons.mobile},
    {"attract": ElementIcons.attract},
    {"monitor": ElementIcons.monitor},
    {"zoomOut": ElementIcons.zoomOut},
    {"zoomIn": ElementIcons.zoomIn},
    {"search": ElementIcons.search},
    {"camera": ElementIcons.camera},
    {"takeawayBox": ElementIcons.takeawayBox},
    {"upload2": ElementIcons.upload2},
    {"download": ElementIcons.download},
    {"paperclip": ElementIcons.paperclip},
    {"printer": ElementIcons.printer},
    {"folderChecked": ElementIcons.folderChecked},
    {"folderDelete": ElementIcons.folderDelete},
    {"folderRemove": ElementIcons.folderRemove},
    {"documentAdd": ElementIcons.documentAdd},
    {"folderAdd": ElementIcons.folderAdd},
    {"folderOpened": ElementIcons.folderOpened},
    {"document": ElementIcons.document},
    {"documentChecked": ElementIcons.documentChecked},
    {"documentCopy": ElementIcons.documentCopy},
    {"documentDelete": ElementIcons.documentDelete},
    {"documentRemove": ElementIcons.documentRemove},
    {"folder": ElementIcons.folder},
    {"tickets": ElementIcons.tickets},
    {"edit": ElementIcons.edit},
    {"circleClose": ElementIcons.circleClose},
    {"date": ElementIcons.date},
    {"caretTop": ElementIcons.caretTop},
    {"caretBottom": ElementIcons.caretBottom},
    {"caretRight": ElementIcons.caretRight},
    {"caretLeft": ElementIcons.caretLeft},
    {"share": ElementIcons.share},
    {"more": ElementIcons.more},
    {"phone": ElementIcons.phone},
    {"videoCameraSolid": ElementIcons.videoCameraSolid},
    {"starOn": ElementIcons.starOn},
    {"menu": ElementIcons.menu},
    {"messageSolid": ElementIcons.messageSolid},
    {"dCaret": ElementIcons.dCaret},
    {"cameraSolid": ElementIcons.cameraSolid},
    {"success": ElementIcons.success},
    {"error": ElementIcons.error},
    {"location": ElementIcons.location},
    {"picture": ElementIcons.picture},
    {"circlePlus": ElementIcons.circlePlus},
    {"info": ElementIcons.info},
    {"remove": ElementIcons.remove},
    {"warning": ElementIcons.warning},
    {"question": ElementIcons.question},
    {"userSolid": ElementIcons.userSolid},
    {"sGrid": ElementIcons.sGrid},
    {"sCheck": ElementIcons.sCheck},
    {"sData": ElementIcons.sData},
    {"sFold": ElementIcons.sFold},
    {"sOpportunity": ElementIcons.sOpportunity},
    {"sCustom": ElementIcons.sCustom},
    {"sTools": ElementIcons.sTools},
    {"sClaim": ElementIcons.sClaim},
    {"sFinance": ElementIcons.sFinance},
    {"sComment": ElementIcons.sComment},
    {"sFlag": ElementIcons.sFlag},
    {"sMarketing": ElementIcons.sMarketing},
    {"sGoods": ElementIcons.sGoods},
    {"sHelp": ElementIcons.sHelp},
    {"sShop": ElementIcons.sShop},
    {"sOpen": ElementIcons.sOpen},
    {"sManagement": ElementIcons.sManagement},
    {"sTicket": ElementIcons.sTicket},
    {"sRelease": ElementIcons.sRelease},
    {"sHome": ElementIcons.sHome},
    {"sPromotion": ElementIcons.sPromotion},
    {"sOperation": ElementIcons.sOperation},
    {"sUnfold": ElementIcons.sUnfold},
    {"sPlatform": ElementIcons.sPlatform},
    {"sOrder": ElementIcons.sOrder},
    {"sCooperation": ElementIcons.sCooperation},
    {"videoPlay": ElementIcons.videoPlay},
    {"videoPause": ElementIcons.videoPause},
    {"goods": ElementIcons.goods},
    {"upload": ElementIcons.upload},
    {"sortDown": ElementIcons.sortDown},
    {"sortUp": ElementIcons.sortUp},
    {"cScaleToOriginal": ElementIcons.cScaleToOriginal},
    {"eleme": ElementIcons.eleme},
    {"deleteSolid": ElementIcons.deleteSolid},
    {"platformEleme": ElementIcons.platformEleme},
  ];
  @override
  Widget build(BuildContext context) {
    return Wrap(
      spacing: 5, // 主轴(水平)方向间距
      runSpacing: 5, // 纵轴（垂直）方向间距
      // alignment: WrapAlignment.center, //沿主轴方向居中
      // crossAxisAlignment: WrapCrossAlignment.center,
      direction: Axis.horizontal,
      children: iconList
          .map(
            (e) => Container(
              padding: const EdgeInsets.all(20),
              width: 180,
              child: Column(
                children: [
                  Icon(
                    e[e.keys.first],
                    size: SkyIconSizes().largeFont,
                  ),
                  Text(e.keys.first)
                ],
              ),
            ),
          )
          .toList(),
    );
  }
}
